import java.util.*;

/**实现删除字符串中出现次数最少的字符，
 * 若多个字符出现次数一样，则都删除。
 * 输出删除这些单词后的字符串，
 * 字符串中其它字符保持原来的顺序。
 * Created by JiaJia on 2019/4/10 0010.
 */
public class HuaWei022 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            String input=sc.nextLine();
            System.out.println(deleteChar(input));
        }
        sc.close();
    }

    private static String deleteChar(String str){
        HashMap<Character,Integer> map = new HashMap<>();

        for (int i = 0; i <str.length() ; i++) {
            char c = str.charAt(i);
            if(map.containsKey(c)){
                map.put(c,map.get(c)+1);
            }else{
                map.put(c,1);
            }

        }

        int min = Integer.MAX_VALUE;
        Collection<Integer> coll = map.values();
        for (int j:coll) {
            if(j<min){
                min = j;
            }
        }
        Set<Character> set = new HashSet<>();
        Set<Map.Entry<Character,Integer>> entries = map.entrySet();
        for (Map.Entry<Character,Integer> e:entries){
            if(e.getValue()==min){
                set.add(e.getKey());
            }
        }

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i <str.length() ; i++) {
            char ch = str.charAt(i);
            if(!set.contains(ch)){
                sb.append(ch);
            }
        }

        return sb.toString();
    }
}